package br.ufrj.ppgi.infovis.styles;

import org.junit.Assert;
import org.junit.Test;
import org.mt4j.util.MTColor;

public class TestConfiguration {
	
	@Test
	public void testGetTitle() {
		Configuration configuration = new Configuration("myconf");
		Assert.assertEquals("myconf",configuration.getTitle());
	}
	
	@Test
	public void testGetColorByCategoryName(){
		Configuration configuration = new Configuration("myconf");
		configuration.addCategory(new Category("Aluno", "#6CC41A", "default"));
		configuration.addCategory(new Category("Professor", "#E01B6A", "default"));
		
		Assert.assertEquals(new MTColor(224,27,106), configuration.getColorByCategoryName("Professor"));
	}
	
	@Test
	public void testGetIconByCategoryName(){
		Configuration configuration = new Configuration("myconf");
		configuration.addCategory(new Category("Aluno", "#6CC41A", "default"));
		configuration.addCategory(new Category("Professor", "#E01B6A", "professor.png"));
		
		Assert.assertEquals("professor.png", configuration.getIconByCategoryName("Professor"));
	}
	
	
	

}
